$(function(){
	$('#fbLogin').click(function(e){
		e.preventDefault();
		FB.login(function(response) {
			  showModalLoading();	
			  test = response;
			  var accessToken = response.authResponse.accessToken;
			  var userId = response.authResponse.userID;
			  $('#userId').val(userId);
			  $('#token').val(accessToken);
			  $("body").addClass("loading");
		      $('#loginForm').submit();
		  }, {scope:'read_stream, offline_access,email'});
	});
	
	
	  
	
  });

